package com.ruoyi.system.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.UserMeetSchedule;
import com.ruoyi.system.service.IUserMeetScheduleService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 进出时间记录Controller
 */
@RestController
@RequestMapping("/system/schedule")
public class UserMeetScheduleController extends BaseController {
    @Autowired
    private IUserMeetScheduleService userMeetScheduleService;

    /**
     * 查询进出时间记录列表
     */
    @PreAuthorize("@ss.hasPermi('system:schedule:list')")
    @GetMapping("/list")
    public TableDataInfo list(UserMeetSchedule userMeetSchedule) {
        startPage();
        List<UserMeetSchedule> list = userMeetScheduleService.selectUserMeetScheduleList(userMeetSchedule);
        return getDataTable(list);
    }

    /**
     * 删除进出时间记录
     */
    @PreAuthorize("@ss.hasPermi('system:schedule:remove')")
    @Log(title = "进出时间记录", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(userMeetScheduleService.deleteUserMeetScheduleByIds(ids));
    }
}
